* {
    margin: 0;
    padding: 0;
}

body {
    margin: 0;
    width: 100%;
    font-family: Arial, sans-serif;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
    transition: background-color 1s ease, color 1s ease;

}

img {
    pointer-events: none;
}

video {
    pointer-events: none;
}

.logo {
    /* Replace fixed positioning with appropriate positioning */
    font-size: 2rem;
    /* Adjust font size as needed */
    margin: 0;
    padding-top: 1.5rem;
    padding-left: 4.2rem;
    padding-bottom: 1.25rem;
    width: 90%;
    /* position: fixed; */
    /* color: white; */
    /* background-color: rgb(255, 255, 255); */


    /* backdrop-filter: blur(10px); */

    font-family: "Montserrat";
    font-weight: normal;

    transition: 0.5s;
    transition: background-color 1s ease, color 1s ease;
}

/* para que el script de mover el nav y logo tengan animacion  */
#titulo {
    transition: top 0.3s ease;
    /* Añade transición a la propiedad top */
}

h1 a {
    text-decoration: none;
    color: black;
    transition: color 1s ease;
    transition: all 0.5s;
}

.paginado {
    position: relative;
    width: 100%;
    min-height: 80vh;
    max-width: 100vw;

    /* aqui va la imagen de fondo del texto de presentación */
    /* background-image: url(); */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;

    transition: all 1s ease;
}

body.bg-black .paginado {
    opacity: 0;
}

.paginado h2 {
    position: relative;
    /* or relative */
    text-align: center;
    margin-top: 5rem;
    font-size: 4.5rem;
    padding-bottom: 1rem;
    /* background-color: #ffffff; */
    z-index: 1;

    font-family: "Montserrat";
    font-weight: normal;
}

.paginado img {
    opacity: 15%;
    width: 100%;
    /* margin-top: -3rem; */
    object-fit: cover;
    /*hace crop en vez de apretarlo*/
}

.paginado p {
    padding: 1rem;
    /* Ajuste de padding para controlar el espacio alrededor del texto */
    position: relative;

    max-width: 40%;
    /* Limitar el ancho del texto para que no ocupe toda la pantalla */
    margin: 0 auto;
    /* Centrar el párrafo horizontalmente */

    overflow: hidden;
    text-align: justify;
    /* Justifica el texto */
    text-align-last: center;
    /* Centra la última línea del texto */

    font-family: "Montserrat";
    font-weight: normal;
    font-size: 1rem;
    line-height: 1.5rem;
    border-radius: 10px;
    /* Reducido para que sea menos pronunciado */

    /* border: solid black; */
    /*border-radius: 50px;
    background: linear-gradient(50deg,
            rgba(255, 255, 255, 0.4) 12%,
            rgba(255, 255, 255, 0.1) 77%);
     box-shadow: 0px 4px 24px 1px rgba(0, 0, 0, 0.28); 
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(5px);*/
}

/* 1. Ocultamos el checkbox real (la cajita) */
#toggle-leer-mas {
    display: none;
}

/* 2. Ocultamos el texto extra por defecto */
.texto-extra {
    display: none;
}

/* 3. MAGIA: Cuando el checkbox está marcado (:checked), 
       buscamos el texto extra dentro del párrafo hermano y lo mostramos */
#toggle-leer-mas:checked~p .texto-extra {
    display: inline;
    
}


/* 4. Estilo del botón "Leer más" */
.lbl-leer-mas {
    cursor: pointer;
    font-weight: bold;
    text-decoration: underline;
    color: black;
    /* O el color que uses */
}

/* 5. Cambiar el texto del botón usando pseudo-elementos */
.lbl-leer-mas::after {
    content: "Leer más";
    /* Texto por defecto */
}

/* Cuando esté abierto, cambiamos el texto a "Leer menos" */
#toggle-leer-mas:checked~.lbl-leer-mas::after {
    content: "Leer menos";
}

.grid {
    /* centrar div */
    margin-left: auto;
    margin-right: auto;
    /* anchura */
    /* width: 100vw; */

    list-style: none;
    display: grid;


    grid-template-columns: repeat(4, 1fr);
    /* 3 columnas de igual ancho */

    /* gap: 4rem; Espacio entre las imágenes */
    justify-content: space-evenly;
    align-items: start;
    gap: 2rem;

    position: relative;
    z-index: 1;

}

/* EXPLICACION
before es un pseudoelemento que esta en principio en 1er plno, cuando la transicion bg-black 
entra la opacidade del before baja y entra el normal */
/* .grid::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: 100%;
    background-repeat: repeat;
    opacity: 0.3;
    transition: opacity 1s ease;
    z-index: -1;
} */

body.bg-black .grid::before {
    opacity: 0;
    /* Desvanecer la imagen de fondo */
}

.grid li {
    /* display: block; */

    padding-inline: 2rem;
    /* padding-bottom: 5rem; */
    /* padding-bottom: 1rem; */

    max-width: 80%;

}

figure {
    display: block;

    transition: all 0.2s;

    box-shadow: rgba(0, 0, 0, 0.423) 0px 48px 100px 0px;

}

.grid img {
    display: block;

    width: 100%;
    /* Que las imágenes ocupen todo el ancho de su contenedor */
    height: auto;
    /* Ajusta la altura automáticamente para mantener la proporción */
    object-fit: cover;
    /* Recorta la imagen para cubrir todo el área */

}

.grid figure:hover {
    transform: scale(1.05);
}


.feed {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;

    padding-top: 5rem;
    padding-bottom: 3.3rem;
    position: relative;
    z-index: 1;
}

.feed::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: 100%;
    background-repeat: repeat;
    opacity: 0.3;
    transition: opacity 1s ease;
    z-index: -1;
}

body.bg-black .feed::before {
    opacity: 0;
    /* Desvanecer la imagen de fondo */
}

.column {
    flex: 1 1 25%;
    max-width: 30%;
    padding: 0 40px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

}

/* Ensure images fill the column */
.obra {
    position: relative;
    /* Ensure it serves as the reference point for absolute positioning */
    margin: 0.5rem 0;
    cursor: pointer;
    transition: all 0.3s;
    overflow: hidden;
    /* Prevent the content from overflowing */
    justify-content: center;
    /* Center content horizontally */
    align-items: center;
    /* Center content vertically */
    /* border: solid red 0.1px; */

    box-shadow: rgba(17, 12, 46, 0.15) 0px 48px 100px 0px;

}

.obra img {
    display: block;
    /* Ensures image is a block-level element */
    width: 100%;
    /* Makes sure image fills the <a> */
    height: auto;
    /* Maintains aspect ratio */
    object-fit: cover;
    /* Ensures the image covers the area without distortion */

    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;

}

.obra:hover {
    transform: scale(1.05);
}


/* EXPLICACION
before es un pseudoelemento que esta en principio en 1er plno, cuando la transicion bg-black 
entra la opacidade del before baja y entra el normal */
.canvas {

    position: relative;

    width: 100%;
    height: 100vh;
    transition: opacity 1s ease;

}

.canvas::before {
    content: "";
    transition: opacity 1s ease;
}

/* El pseudo-elemento ::after para la flecha */
.canvas::after {
    color: rgba(255, 255, 255, 0.567);
    content: "↓";
    /* Símbolo de flecha hacia abajo */
    font-size: 3rem;
    /* Tamaño de la flecha */
    position: absolute;
    top: calc(45% + 45%);
    /* Calcula la posición de la flecha debajo de la imagen */
    left: 50%;
    transform: translateX(-50%);
    /* Centra la flecha */
    margin-top: 10px;
    /* Espacio entre la imagen y la flecha */

    font-family: "Montserrat";
    font-weight: normal;
}

/* Style for the downward arrow cursor */
.canvas:hover {
    /* cursor: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 512 512'%3e%3cg transform='rotate(45 256 256)'%3e%3crect id='r' x='16' y='216' width='480' height='80' rx='14'/%3e%3cuse href='%23r' transform='rotate(90 256 256)'/%3e%3c/g%3e%3c/svg%3e") 15 16, pointer; */
    cursor: pointer;

}

.canvas img {
    max-width: 60%;
    max-height: 75%;
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.canvas video {
    max-width: 60%;
    max-height: 75%;
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.canvas footer {
    color: rgba(255, 255, 255, 0.567);

    position: absolute;
    bottom: 0;
    left: 0;
    padding: 10px;

    margin-bottom: 1rem;
    margin-left: 1rem;

    font-family: "Montserrat";
    font-weight: normal;
}

.canvas p {
    line-height: 1.5rem;
}

body.bg-black .canvas::before {
    opacity: 0;
    /* Mostrar la imagen de fondo cuando se aplique .bg-black */
}


body.bg-black {
    background-color: rgba(0, 0, 0, 0.84);
    /* Cambiar el fondo a negro */
}

/* CSS cuando la clase bg-black está activa */
body.bg-black .logo {
    backdrop-filter: blur(2px);
}

body.bg-black .logo a {
    color: white;
    /* Ajustar la opacidad del texto */
    opacity: 70%;
}

body.bg-black .navbtn {
    color: white;
    /* Ajustar la opacidad del texto */
    opacity: 70%;
    background-color: transparent;
}

body.bg-black .sidenav {
    background-color: rgba(0, 0, 0, 0.5);
}

body.bg-black .sidenav a {
    color: white;
    /* Ajustar la opacidad del texto */
    opacity: 70%;
    background-color: transparent;

}

body.bg-black header h1 {
    background-color: transparent;
    /* Desactivar el color de fondo */
}

.navbtn {
    display: none;
    position: fixed;

    margin: 0;
    right: 0;
    top: 0;
    cursor: pointer;
    z-index: 1000;

    /* background-color: white; */
    font-family: "Montserrat";
    transition: top 0.3s;
    /* Transition effect when sliding down (and up) */

}

/* Estilo por defecto, sin soporte para backdrop-filter */
.sidenav {
    height: 100%;
    width: 0;
    position: fixed;
    z-index: 10;
    top: 0;
    right: 0;

    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    background-color: rgb(255, 255, 255);

    overflow-x: hidden;
    transition: 0.5s;
}

/* Si el navegador soporta backdrop-filter */
@supports ((-webkit-backdrop-filter: blur(15px)) or (backdrop-filter: blur(15px)) or (background-filter: blur(15px))) {
    .sidenav {
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        /* background-color: rgba(255, 255, 255); */
    }
}

/* The navigation menu links */
.sidenav a {
    padding: 8px 8px 8px 32px;
    text-decoration: none;
    font-size: 1.3rem;
    color: #000000;
    display: block;
    transition: 0.3s;

    white-space: nowrap;
    /* Prevent text wrapping */

    font-family: "Montserrat";

}

.sidenav a:hover {
    color: #f1f1f1;
}

.sidenav .closebtn {
    left: 10px;
    font-size: 36px;
}
.leer-mas-container{
    display: none;
}
@media (max-width: 1000px) {
    body.bg-black .navbtn {
        background-color: none;
    }

    .logo {
        margin: 0;
        font-size: 1.2rem;
        position: fixed;
        top: 0;
        /* required */
        margin: 0;
        width: 70%;
        padding-top: 1rem;
        padding-left: 1rem;
        padding-right: 20rem;
        padding-bottom: 0.5rem;
        background-color: white;
        z-index: 5;
    }

    .navbtn {
        display: block;
        font-size: 0.8rem;

        padding-left: 1.3rem;
        padding-top: 1.3rem;
        padding-right: 1.3rem;
        padding-bottom: 1.3rem;
        z-index: 6;
    }


    .paginado {
        margin-top: 3rem;
        width: 100%;
        min-height: 70vh;
        /* margin-top: -3rem; */
    }

    .paginado h2 {
        font-size: 3.3rem;
        margin-top: 2rem;
        padding-bottom: 0.5rem;
    }

    .paginado p {
        font-size: 1rem;
        line-height: 1.4rem;
        max-width:70%;
    }

    .extra {
        display: none;
    }

    .extra.visible {
        display: inline;
    }

    /* Contenedor separado */
    .leer-mas-container {
        margin-top: 1.5rem;
        margin-bottom: 1.5rem;
        text-align: center;
    }

    /* Botón más fino y artístico */
    .btn {
        text-align: center;
        position: relative;
        font-family: "Montserrat";
        font-size: 1rem;
        letter-spacing: 0.05em;
        text-transform: uppercase;
        cursor: pointer;
        opacity: 0.7;
        transition: all 1s ease;
    }

    /* Línea fina debajo */
    .btn::after {
        content: "";
        display: block;
        width: 60%;
        height: 1px;
        background: black;
        margin: 0.3rem auto 0 auto;
        transition: width 1s ease;
    }

    /* Hover elegante */
    .btn:hover {
        opacity: 1;
    }

    .btn:hover::after {
        width: 60%;
    }

    /* Separación visual para palabras clave */
    .palabras-clave {
        display: block;
        text-transform: uppercase;
        margin-top: 1.5rem;
        font-size: 0.85rem;
        opacity: 0.6;
    }

    .grid {
        max-width: 100vw;
        padding-inline: 1rem;
        padding-top: 1rem;
        gap: 0.5rem;
        grid-template-columns: repeat(3, 1fr);

        /* padding: 2rem; */
    }

    .grid li {
        max-width: max-content;
        padding-inline: 0.4rem;
        padding-bottom: 0rem;

    }

    .canvas {
        position: relative;
        display: flex;
        align-items: center;
        flex-direction: column;
        justify-content: center;
        /* align-items: center; */

        width: 100%;
    }

    .canvas img {
        max-width: 90vw;
        max-height: 70vh;
        max-height: auto;
        position: relative;
        align-self: center;
        top: auto;
        left: auto;
        transform: none;
    }

    .canvas video {
        max-width: 90vw;
        max-height: 70vh;
        position: relative;
        top: auto;
        left: auto;
        transform: none;
    }


    .canvas footer {
        width: 100%;
        /* Para que use todo el ancho disponible en el contenedor flex */

        position: relative;
        display: flex;
        flex-direction: column;

        justify-content: flex-start;
        /* distribuye el contenido arriba */
        align-items: flex-start;
        /* alinea el contenido a la izquierda */

        text-align: left;

        bottom: 0;
        left: 1;
        padding: 10px 0 0 0;
        /* padding-top: 1rem; ya lo tienes con esto */
        margin: 0;
        max-width: 90vw;
    }



}